//package org.example.config;
//
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.*;
//
///**
// * @author GuoChunbo
// * @create 2021-02-25 11:21
// * @Description: 类的描述
// */
//@EnableWebMvc
//@Configuration
//public class WebMvcConfig extends WebMvcConfigurationSupport{
//
//    @Override
//    protected void addCorsMappings(CorsRegistry registry) {
//        registry.addMapping("/**")
//                .allowedOrigins("*")
//                .allowedMethods("GET", "HEAD", "POST","PUT", "DELETE", "OPTIONS")
//                .allowedHeaders("*")
//                .exposedHeaders(
//                        "access-control-allow-headers",
//                        "access-control-allow-methods",
//                        "access-control-allow-origin",
//                        "access-control-max-age",
//                        "X-Frame-Options")
//                .allowCredentials(true)
//                .maxAge(3600);
//        super.addCorsMappings(registry);
//    }
//
//
//    @Override
//    public void addResourceHandlers(ResourceHandlerRegistry registry) {
//        //静态资源映射
//        registry.addResourceHandler("/**").addResourceLocations("classpath:/static/");
//    }
//}
